﻿#ifndef _EASY_IOCP_CLIENT_H_
#define _EASY_IOCP_CLIENT_H_

#ifdef _WIN32

#include "EasyTcpClient.h"
#include "CELLIOCP.hpp"

class EasyIOCPClient : public EasyTcpClient
{
public:
	virtual ~EasyIOCPClient();

	// 发送数据
	// 处理网络消息
	virtual bool OnRun(int microseconds = 1) override;

	virtual void Close() override;
protected:
	virtual void OnInitSocket() override;

	virtual void OnConnect() override;

	int DoNetIOCPEvents(int timeout);
private:
	CELLIOCP _iocp;

	IO_EVENT _ioEvent;
};

#endif // #ifdef _WIN32

#endif // #ifndef _EASY_IOCP_CLIENT_H_
